<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="author" content="得闲技术 Team">
    <meta name="copyright" content="得闲技术">
    <title>查看操作日志 - Powered By 得闲技术</title>
    [#include "/admin/main/resources/list.ftl"/]
</head>
<body class="admin secondary">
<main>
    <div class="container-fluid">
        <form id="saveOrUpdateForm" class="ajax-form form-horizontal" action="" method="post">

            <div class="panel panel-default">
                <div class="panel-heading">查看操作日志</div>
                <div class="panel-body padding-5">

                    <div class="tab-content">
                        <div id="basic" class="tab-pane active">
                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label">创建时间:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${(content.createDate?string("yyyy-MM-dd HH:mm:ss"))!}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="browser">浏览器:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.browser!}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="browserVersion">浏览器版本:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.browserVersion!}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="osName">操作系统:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.osName!}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="deviceType">设备类型:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.deviceType!}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="username">操作员:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    <a href="../admin/edit?id=${content.adminId}" target="_blank">
                                        ${content.username}
                                    </a>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="ip">IP地址:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    <a href="https://www.ip138.com/iplookup.asp?ip=${content.ip}&action=2"
                                            target="_blank" title="查看IP归属地" data-toggle="tooltip">
                                        ${content.ip}
                                    </a>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="module">功能模块:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.module}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="operateType">操作类型:</label>
                                <div class="col-xs-9 col-sm-4  form-control-static">
                                    ${message("OperateTypeEnum." + content.operateType)}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="method">操作方法:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.method!}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="beginTimeMillis">方法耗时:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.endTimeMillis - content.beginTimeMillis} MS
                                    <p class="text-gray">
                                        ${content.beginTimeMillis!0} 至 ${content.endTimeMillis!0}MS
                                    </p>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="method">操作描述:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.description!}
                                    <p class="text-gray">
                                        ${content.operateUrl}
                                    </p>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="request">请求参数:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.request!}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-3 col-sm-2 control-label" for="response">响应结果:</label>
                                <div class="col-xs-9 col-sm-4 form-control-static">
                                    ${content.response!}
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
                <div class="panel-footer">
                    <div class="row">
                        <div class="col-xs-9 col-sm-10 col-xs-offset-3 col-sm-offset-2">
                            <button class="btn btn-default" type="button" data-action="back">返 回</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</main>
<script>
    $().ready(function () {
        [#if !content??]
        bootbox.alert({
            title: "提示信息",
            message: "信息不存在或已删除，请检查后重试！",
            callback: function () {
                history.go(-1);
            }
        });
        [/#if]
    });
</script>
</body>
</html>
